package com.jrx.anytxn.param.service.investor;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.param.dto.investor.PrInvestorPrepaymentFeeReq;
import com.jrx.anytxn.param.dto.investor.PrInvestorPrepaymentFeeRes;
import com.jrx.anytxn.param.entity.PrInvestorPrepaymentFee;

/**
 * 出资方提前还款手续费表 业务接口
 *
 * @author 黄秋平
 * @date 2020年5月19日11:45:21
 */
public interface IPrInvestorPrepaymentFeeService {

    /**
     * 根据租户ID分页查询提前还款手续费参数信息
     * @param pageNum
     * @param pageSize
     * @param tenantId
     * @return
     * @throws TxnException
     */
    TxnPage<PrInvestorPrepaymentFeeRes> findAllPageByTenId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;

    /**
     * 添加提前结清费参数
     *
     * @param prPrepaymentFeeReq 提前还款手续费请求实体
     * @return
     * @throws TxnException
     */
    PrInvestorPrepaymentFeeRes addPrPrepaymentFee(PrInvestorPrepaymentFeeReq prPrepaymentFeeReq) throws TxnException;

    /**
     * 更新提前还款手续费参数
     *
     * @param prPrepaymentFeeReq 提前还款手续费参数入参对象
     * @return PrPrepaymentFeeRes 提前还款手续费参数响应参数
     * @throws TxnException
     */
    PrInvestorPrepaymentFeeRes modifyPrPrepaymentFee(PrInvestorPrepaymentFeeReq prPrepaymentFeeReq) throws TxnException;

    /**
     * 通过租户ID和费用表ID删除提前还款手续费参数
     *
     * @param tenantId 租户ID
     * @param investorPrepaymentFeeId    费用表ID
     * @return
     * @throws TxnException
     */
    Boolean removeByTenIdAndFeeId(String tenantId, String investorPrepaymentFeeId) throws TxnException;

    /**
     * 通过租户ID和费用表ID查询提前还款手续费参数
     *
     * @param tenantId 租户ID
     * @param investorPrepaymentFeeId    提前结清费用表ID
     * @return
     * @throws TxnException
     */
    PrInvestorPrepaymentFeeRes findByTenIdAndFeeId(String tenantId, String investorPrepaymentFeeId) throws TxnException;

    /**
     * 根据字段查询
     * @param investorPrepaymentFeeId
     * @param tenantId
     * @return
     * @throws TxnBizException
     */
    PrInvestorPrepaymentFee findByPrepaymentFeeId(String investorPrepaymentFeeId, String tenantId) throws TxnBizException;
}
